package com.east.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.east.bean.Contract;
import com.east.controller.statistical.Operation;
import com.east.utils.BaseMapper;

public interface ContractMapper extends BaseMapper<Contract> {
	
	List<Contract> findAll(Map<String, Object> map);
	/**
	 * 编号模糊查
	 * @param cSerialNum
	 * @return
	 */
	int findBySerNumLike(@Param("cSerialNum")String cSerialNum);
	/**
	 * 单查
	 * @param cId
	 * @return
	 */
	Contract findOne(@Param("cId")Integer cId);
	/**
	 * 根据项目查找采购明细
	 * @param pId
	 * @return
	 */
	List<Contract> findByContract(@Param("pId")Integer pId);
	
	
	/**
	 * 销售 采购 经营统计
	 * @param type
	 * @return
	 */
	Operation findByOperation(Map<String, Object> map);
	
	/**
	 * 年度总金额
	 * @param map
	 * @return
	 */
	List<Operation> findByOperationChart(Map<String, Object> map);
	/**
	 * 销售按月统计
	 * @return
	 */
	List<Operation> findBySaleChart(Map<String, Object> map);
}